<template ></template>
<script lang="ts" setup>
import { Convert } from "@/utils/Convert";
import { UserContext } from "@/utils/UserContext";
import { withDefaults, defineProps } from "vue";
//获取url中参数
const props = withDefaults(defineProps<{ shareId: number }>(),
    {
        shareId: 0
    });

let shareId = Convert.toNumber("0");
if (!UserContext.isExist()) {
    let redirectUrl = "/user/login";
    if (shareId > 0) {
        redirectUrl = `/user/register/${shareId}`;
    }
    location.href = redirectUrl;
} else {
    location.href = "/";
}
</script>
<style >
</style>